const deleteByIndex = ({dataArr: dataArr,index:index}) => {
  for (let i = index; i < dataArr.length;i++){
    if (i < dataArr.length-1){
      dataArr[i] = dataArr[i+1];
    }else{
      dataArr.pop();
    }
  }
  return dataArr;
}


module.exports = {
  deleteByIndex: deleteByIndex
};